﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package reprise.data.collection {

    public class HashMap {

        protected var m_map:Array;
        protected var m_size:int;

        public function HashMap(){
            clear();
        }
        public function containsKey(_arg1:String):Boolean{
            return (!((m_map[_arg1] == undefined)));
        }
        public function size():int{
            return (m_size);
        }
        public function values():Array{
            var _local2:String;
            var _local1:Array = [];
            for (_local2 in m_map) {
                _local1.push(m_map[_local2]);
            };
            return (_local1);
        }
        public function removeObject(_arg1:Object):void{
            var _local2:String;
            for (_local2 in m_map) {
                if (m_map[_local2] == _arg1){
                    delete m_map[_local2];
                    m_size--;
                };
            };
        }
        public function toObject():Object{
            return (m_map);
        }
        public function clear():void{
            m_map = [];
            m_size = 0;
        }
        public function objectForKey(_arg1:String):Object{
            var _local2:Object = m_map[_arg1];
            return (_local2);
        }
        public function setObjectForKey(_arg1:Object, _arg2:String):void{
            if (!containsKey(_arg2)){
                m_size++;
            };
            m_map[_arg2] = _arg1;
        }
        public function removeObjectForKey(_arg1:String):void{
            if (!containsKey(_arg1)){
                return;
            };
            delete m_map[_arg1];
            m_size--;
        }
        public function keys():Array{
            var _local2:String;
            var _local1:Array = [];
            for (_local2 in m_map) {
                _local1.push(_local2);
            };
            return (_local1);
        }
        public function containsObject(_arg1:Object):Boolean{
            var _local2:String;
            for (_local2 in m_map) {
                if (m_map[_local2] == _arg1){
                    return (true);
                };
            };
            return (false);
        }

    }
}//package reprise.data.collection 
